package com.econ.powercloud.ems.common.enums;

/**
 * @Author : zjf
 * @Description : 储能站运营状态
 * @Date : 2022/5/27 15:15
 * @Modified by : zjf
 */
public enum StationOperateStatusType implements EnumMethod{
    PUT_OPERATION(0,"已投运"),
    QUIT(1,"退出"),
    TEST_RUN(2,"试运行"),
    NOT_RUN(3,"未运行"),
    ;

    private Integer code;
    private String desc;

    @Override
    public Integer getCode() {
        return code;
    }

    @Override
    public String getDesc() {
        return desc;
    }

    StationOperateStatusType(int code, String desc){
        this.code=code;
        this.desc=desc;
    }

    public static String getCodeFromCode(int code){
        for(StationOperateStatusType type: StationOperateStatusType.values()){
            if(type.getCode() == code){
                return type.getDesc();
            }
        }
        return null;
    }

}
